home *** CD-ROM | disk | FTP | other *** search
/ Workbench Design / WB Collection.iso / workbench werkzeuge / boot tools / bootpicture / bootpicture.c < prev    next >
C/C++ Source or Header  |  1996-04-07  |  2KB  |  81 lines

  1. /*
  2.     Name        BootPicture
  3.     Version        1.00
  4.     Date        12.08.95
  5.     Compiler    SAS C/C++ 6.55
  6.     Code        Wojciech Jeczmien  email: jeczmien@panda.bg.univ.gda.pl
  7.     Picture        Joshua B. Wingell  email: jbw0577@cs.rit.edu
  8. */
  9. #include <string.h>
  10. #include <stdlib.h>
  11. #include <intuition/intuition.h>
  12. #include <intuition/intuitionbase.h>
  13. #include <proto/intuition.h>
  14. #include <proto/graphics.h>
  15. #include <proto/dos.h>
  16.  
  17. extern struct Image im;
  18. extern UWORD cmap[16];
  19. extern USHORT sprite_data[4];
  20.  
  21. char version[64]="$VER: BootPicture 1.00 (12.08.95)";
  22. struct Screen *scr;
  23. struct Window *mywin;
  24. char tytul[]="%BootLogo_Screen100%";
  25.  
  26. main()
  27. {
  28.     struct Window *backwin;
  29.  
  30.     if (!(scr=OpenScreenTags(NULL,
  31.         SA_Left,0,
  32.         SA_Top,0,
  33.         SA_Width,640,
  34.         SA_Height,512,
  35.         SA_Depth,4,
  36.         SA_Title,tytul,
  37.         SA_Quiet,TRUE,
  38.         SA_ShowTitle,FALSE,
  39.         SA_Type,CUSTOMSCREEN,
  40.         SA_DisplayID,HIRESLACE_KEY,
  41.         SA_Draggable,FALSE,
  42.         TAG_DONE )))
  43.             exit(0);
  44.     LoadRGB4(&scr->ViewPort,cmap,16);
  45.     if (!(mywin=OpenWindowTags(NULL,
  46.         WA_Left,140,
  47.         WA_Top,20,
  48.         WA_Width,353,
  49.         WA_Height,441,
  50.         WA_Flags,WFLG_SMART_REFRESH | WFLG_BORDERLESS | ACTIVATE | WFLG_RMBTRAP,
  51.         WA_CustomScreen,scr,
  52.         TAG_DONE))) {
  53.             CloseScreen(scr);
  54.             exit(0);
  55.     }
  56.     SetPointer(mywin,sprite_data, 0, 0, 0, 0);
  57.     DrawImage(mywin->RPort,&im,3,11);
  58.     if (!(backwin=OpenWindowTags(NULL,
  59.         WA_Left,0,
  60.         WA_Top,0,
  61.         WA_Width,640,
  62.         WA_Height,512,
  63.         WA_Flags,WFLG_SMART_REFRESH | WFLG_BORDERLESS | WFLG_BACKDROP | WFLG_RMBTRAP,
  64.         WA_CustomScreen,scr,
  65.         TAG_DONE
  66.         ))) {
  67.             CloseWindow(mywin);
  68.             CloseScreen(scr);
  69.             exit(0);
  70.     };
  71.     SetPointer(backwin,sprite_data, 0, 0, 0, 0);
  72.     while (TRUE){
  73.         Delay(50);
  74.         if (strcmp(IntuitionBase->FirstScreen->DefaultTitle,tytul))
  75.             break;
  76.     }
  77.     CloseWindow(backwin);
  78.     CloseWindow(mywin);
  79.     CloseScreen(scr);
  80. }
  81.